/*
常量
https://www.bilibili.com/video/BV1gf4y1r79E/?p=6&spm_id_from=pageDriver&vd_source=8bd7b24b38e3e12c558d839b352b32f4
*/
package main

import "fmt"

// const 定义枚举类型
const (
	BEIJING      = iota //= 0
	SHANGHAI            //= 1
	GUANGZHOU           //= 2
	SHENZHEN            //= 3
	TIANJIN      = 666
	SHIJIAZHUANG = 777
)

const (
	a2 = 10 * iota
	b2
)

const (
	a3, b3 = iota + 1, iota + 2
	c3, d3
	e3, f3
	g3, h3 = iota * 2, iota * 3
	i3, k3
)

func main() {
	fmt.Println("const")

	const length int = 10
	fmt.Println(BEIJING)
	fmt.Println(SHENZHEN)
	fmt.Println(SHIJIAZHUANG)

	fmt.Println("================")
	fmt.Printf("b2 = %d\n", b2)

	fmt.Println("================")
	fmt.Printf("a3 = %d, b3 = %d\n", a3, b3)
	fmt.Printf("e3 = %d, f3 = %d\n", e3, f3)
	fmt.Printf("g3 = %d, h3 = %d\n", g3, h3)
	fmt.Printf("i3 = %d, k3 = %d\n", i3, k3)
}
